﻿@using PagedList;
@using PagedList.Mvc;
<link href="~/Content/PagedList.css" rel="stylesheet" />
@model IPagedList<Sprint1.Models.Anouncement>
@{
    ViewBag.Title = "Announcements";
}
<h2>Announcements</h2>
@if (Model != null)
{
    foreach (var item in Model)
    {
        @Html.Partial("~/Views/Shared/_Announcement.cshtml", item)
        <br />
    }
    @Html.PagedListPager(Model, page => Url.Action("Announcements", 
        new { 
            page, CourseId = Request.QueryString["CourseId"] }),
            new PagedListRenderOptions() {Display= PagedListDisplayMode.IfNeeded,DisplayPageCountAndCurrentLocation=true
            }
    );
    
}
@**CourseId=5*@